﻿using System;
using System.Globalization;
using System.Threading;
using System.Web.UI;
using Medianamik.DummyWebSite.Data;
using Medianamik.DummyWebSite.Presentation.MasterPages;

namespace Medianamik.DummyWebSite.Presentation.Templates
{
    public partial class ExampleTemplate : Page, IBasePage
    {
        public virtual Guid? CurrentProductCategoryId
        {
            get
            {
                return null;
            }
        }

        public string ShortLang
        {
            get
            {
                return CurrentCulture.Name.Substring(0, 2).ToUpper();
            }
        }

        public IWebPage CurrentWebPage
        {
            get { return new WebPage(); }
        }

        public virtual Guid SubMenuId
        {
            get { return Guid.Empty; }
        }

        public virtual string BasePageMetaKeywords
        {
            get { return ""; }
        }

        public virtual string BasePageMetaDescription
        {
            get{return "";}
        }

        public string GetRelativeUrl(Guid nodeId)
        {
            return "";
        }

        public string GetAbsoluteUrl(Guid nodeId)
        {
            return "";
        }

        public string GetRelativeUrl(Guid nodeId, CultureInfo culture)
        {
            return "";
        }

        public string GetAbsoluteUrl(Guid nodeId, CultureInfo culture)
        {
            return "";
        }

        public string GetElementName(Guid nodeId)
        {
            return "";
        }

        public string GetElementName(Guid nodeId, CultureInfo culture)
        {
            return "";
        }

        public string GetElementLink(Guid nodeId, string cssClass)
        {
            return GetElementLink(nodeId, cssClass, CurrentCulture);
        }
        public string GetElementLink(Guid nodeId)
        {
            return GetElementLink(nodeId, null, CurrentCulture);
        }
        public string GetElementLink(Guid nodeId, string prefix, string suffix)
        {
            return GetElementLink(nodeId, null, prefix, suffix, CurrentCulture);
        }
        public string GetElementLink(Guid nodeId, string cssClass, CultureInfo culture)
        {
            return GetElementLink(nodeId, cssClass, null, null, culture);
        }
        public string GetElementLink(Guid nodeId, string cssClass, string prefix,
            string suffix)
        {
            return GetElementLink(nodeId, cssClass, prefix, suffix, CurrentCulture);
        }
        public string GetElementLink(Guid nodeId, string cssClass, string prefix,
            string suffix, CultureInfo culture)
        {
            return "";
        }

        public string GetLinkElementIfSameDomain(IWebPage page)
        {
            return GetLinkElementIfSameDomain(page, null);
        }
        public string GetLinkElementIfSameDomain(IWebPage page, string cssClass)
        {
            return GetLinkElementIfSameDomain(page, cssClass, null, null);
        }
        public string GetLinkElementIfSameDomain(IWebPage page, string cssClass,
                                                 string prefix, string suffix)
        {
            return "";
        }

        public string GetMenuStateCssClass(Guid nodeId, bool withClassAttribute)
        {
            return "";
        }

        public BaseMasterPage MasterPage
        {
            get { return (BaseMasterPage)Master; }
        }

        public CultureInfo CurrentCulture
        {
            get
            {
                return Thread.CurrentThread.CurrentUICulture;
            }
        }

        public virtual string PageName
        {
            get { return CurrentWebPage.Name; }
        }

        public Guid WebsiteId
        {
            get { return Guid.Empty; }
        }
    }
}
